package com.financing.wap.service.impl;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.financing.wap.dao.IPaymentDao;
import com.financing.wap.dto.FpPaymentDTO;
import com.financing.wap.service.IPaymentService;

@Service("paymentServiceImpl")
public class PaymentServiceImpl implements IPaymentService{

	@Autowired
	private IPaymentDao paymentDaoImpl;
	
	@Override
	public int insertPayment(FpPaymentDTO paymentDTO) throws SQLException {
		return paymentDaoImpl.insertPayment(paymentDTO);
	}

	@Override
	public FpPaymentDTO loadByOrderId(Map<String,String> map) throws SQLException {
		return paymentDaoImpl.loadByOrderId(map);
	}

	@Override
	public void updatePayment(FpPaymentDTO paymentUp) throws SQLException{
		
		 paymentDaoImpl.updatePayment(paymentUp);
	}

	@Override
	public List<FpPaymentDTO> queryPaymentList(Map<String, String> map)
			throws SQLException {
		return paymentDaoImpl.queryPaymentList(map);
	}

	@Override
	public int queryPaymentListCount(Map<String, String> map)
			throws SQLException {
		return paymentDaoImpl.queryPaymentListCount(map);
	}

}
